<div class="left">		    
    <div class="title-page">
	Register
    </div>
    <?php if ($success) { ?>

        <div class="alert alert-success">
	    <?php echo settings()->get('text_site', 'text_sigup_success'); ?>
        </div>	
	<?php
    } else {
	$form = $this->beginWidget('CActiveForm', array(
	    'id' => 'singup-form',
	    'enableAjaxValidation' => true,
	    'enableClientValidation' => false,
	    'clientOptions' => array(
		'validateOnSubmit' => true
	    ),
	    'htmlOptions' => array(
		'class' => 'form-horizontal'
	    )
	));
	?>
        <div class="wrap-input-reg">

    	<table id="sign-up-table">
    	    <tr>
    		<td style='width: 144px;'>
			<?php echo $form->textField($model, 'first_name', array('placeholder' => 'First Name', 'class' => 'short-text-sign-up')); ?>
			<?php echo $form->error($model, 'first_name'); ?>
    		</td>
    		<td>
			<?php echo $form->textField($model, 'last_name', array('placeholder' => 'Last Name', 'class' => 'short-text-sign-up')); ?>
			<?php echo $form->error($model, 'last_name'); ?>
    		</td>
    	    </tr>
    	    <tr>
    		<td colspan="2">
			<?php echo $form->textField($model, 'email', array('placeholder' => 'Email', 'class' => 'long-text-sign-up')); ?>
			<?php echo $form->error($model, 'email'); ?>
    		</td>		    
    	    </tr>
    	    <tr>
    		<td colspan="2">
			<?php echo $form->textField($model, 're_email', array('placeholder' => 'Confirm Email', 'class' => 'long-text-sign-up')); ?>
			<?php echo $form->error($model, 're_email'); ?>
    		</td>		    
    	    </tr>
    	    <tr>
    		<td colspan="2">			 
			<?php echo $form->textField($model, 'username', array('placeholder' => 'Username', 'class' => 'long-text-sign-up')); ?>
			<?php echo $form->error($model, 'username'); ?>
    		</td>
    	    </tr>
    	    <tr>
    		<td colspan="2">			 
			<?php echo $form->passwordField($model, 'password', array('placeholder' => 'Password', 'class' => 'long-text-sign-up')); ?>
			<?php echo $form->error($model, 'password'); ?>
    		</td>
    	    </tr>
    	    <tr>
    		<td colspan="2">
			<?php echo $form->passwordField($model, 'repassword', array('placeholder' => 'Confirm Password', 'class' => 'long-text-sign-up')); ?>
			<?php echo $form->error($model, 'repassword'); ?>
    		</td>		    
    	    </tr>

    	    <tr>
    		<td colspan="2">			 
			<?php echo $form->radioButtonList($model, 'gender', User::getGenderRange()); ?>			
    		</td>		   
    	    </tr>
    	    <tr>
    		<td colspan="2">
    		    <strong>Birthdate:</strong>
    		</td>
    	    </tr>
    	    <tr>
    		<td colspan="2">    		       		    
    		    Month:
    		    <select name="User[month]" class="short-select-sign-up">
			    <?php
			    for ($i = 1; $i <= 12; $i++) {
				echo "<option value='" . $i . "'>" . $i . "</option>";
			    }
			    ?>
    		    </select>

    		    Day:
    		    <select name="User[day]" class="short-select-sign-up">
			    <?php
			    for ($i = 1; $i <= 30; $i++) {
				echo "<option value='" . $i . "'>" . $i . "</option>";
			    }
			    ?>
    		    </select>

    		    Year:
    		    <select name="User[year]" class="year-select-sign-up">
			    <?php
			    $year = date('Y', time());
			    for ($i = 0; $i <= 50; $i++) {
				$j = $year - $i;
				echo "<option value='" . $j . "'>" . $j . "</option>";
			    }
			    ?>
    		    </select>		    
    		</td>
    	    </tr>
    	    <tr>
    		<td colspan="2">
    		    <strong>Country:</strong> <?php echo $form->dropDownList($model, 'country', Country::getSelectList(), array('class' => 'long-select-sign-up select-country-sign-up')) ?>
    		</td>
    	    </tr>
    	    <tr>
    		<td colspan="2">			 
    		    <div id='zip-code'>
			    <?php echo $form->textField($model, 'postcode', array('placeholder' => 'Zip Code', 'class' => 'long-text-sign-up')); ?>
			    <?php echo $form->error($model, 'postcode'); ?>
    		    </div>
    		</td>	    
    	    </tr>
    	    <tr>
    		<td colspan="2">By clicking the button below, you agree to our  <br><a href="<?php echo SITE_NAME_URL ?>terms_&_conditions"><strong>Terms & Conditions</strong></a> and <a href="<?php echo SITE_NAME_URL ?>privacy_policy"><strong>Privacy Policy</strong></a>.</td>    		
    	    </tr>
    	    <tr>
    		<td colspan="2"><p class="sipup-btn"><?php echo Chtml::submitButton('Join Now', array('class' => 'btn btn-warning', 'name' => 'signup')); ?></p></td>

    	    </tr>
    	</table>    										
        </div>

	<?php $this->endWidget(); ?>

    <?php } ?>
</div>
<div class="right">
    <div class="box-right">
	<?php $this->widget('application.widgets.loginbox.LoginBox'); ?>

    </div><!--box-right-->
    <div class="box-right">
	<img src="<?php echo WWW_URL ?>images/branches-bank-finder-banner.jpg" />
    </div><!--box-right-->
    <div class="box-right">
	<img src="<?php echo WWW_URL ?>images/branches-bank-finder-banner.jpg" />
    </div><!--box-right-->

</div><!--right-->
